package com.design.composite.file;

// 文件类，实现了文件系统节点接口
class File implements FileSystemNode {
    private String name;
    private long size;

    public File(String name, long size) {
        this.name = name;
        this.size = size;
    }

    @Override
    public void display() {
        System.out.println("File: " + name + ", Size: " + size + " bytes");
    }

    @Override
    public long getSize() {
        return size;
    }
}
